<%@ page import="org.wlw.service.IMovieService" %>
<%@ page import="org.wlw.factoy.SimpleFactory" %>
<%@ page import="org.wlw.models.Movie" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String name = request.getParameter("name");
    String type = request.getParameter("type");
    String director = request.getParameter("director");
    String actor = request.getParameter("actor");
    double score = Double.parseDouble(request.getParameter("score"));
    IMovieService movieService = SimpleFactory.getMovieService();
    Movie m = new Movie();
    m.setActor(actor);
    m.setName(name);
    m.setScore(score);
    m.setType(type);
    m.setDirector(director);
    movieService.add(m);
    //跳转到列表页面
    response.sendRedirect(request.getContextPath()+"/jsp/list.jsp");
%>

<h3>
    <%=name%>
</h3>